Developer Documentation

QuickTime 4 API Documentation

QuickTime 4 Reference

| Previous | Chapter Contents | Chapter Top | Next |

Working With Movie Spatial Characteristics

SetMovieColorTable

The SetMovieColorTable function allows you to associate a color table with a movie.

pascal OSErr SetMovieColorTable (
                     Movie theMovie,
                     CTabHandle ctab);
theMovie
Specifies the movie for this operation. Your application obtains this identifier from such functions as NewMovie , NewMovieFromFile , and NewMovieFromHandle .

ctab
Contains a handle to the color table. Set this parameter to nil to remove the movie's color table.

Description

The color table you supply may be used to modify the palette of indexed display devices at playback time. If you are using the movie controller, be sure to set the mcFlagsUseWindowPalette flag. If you are not using the movie controller, you should retrieve the movie's color table (using the GetMovieColorTable function) and supply it to the Palette Manager.

The toolbox makes a copy of the color table, so it is your responsibility to dispose of the color table when you are done with it. If the movie already has a color table, the toolbox uses the new table to replace the old one.

The CopyMovieSettings function copies the movie's color table, along with the other settings information.

RESULT CODES

invalidMovie
-2010 The movie is corrupted or invalid

Memory Manager errors

GetMovieColorTable

The GetMovieColorTable function allows you to retrieve a movie's color table.

pascal OSErr GetMovieColorTable (
                     Movie theMovie,
                     CTabHandle *ctab);
theMovie
Specifies the movie for this operation. Your application obtains this identifier from such functions as NewMovie , NewMovieFromFile , and NewMovieFromHandle .

ctab
Contains a pointer to a field that is to receive a handle to the movie's color table. If the movie does not have a color table, the toolbox sets the field to nil .

Description

The toolbox returns a copy of the color table, so it is your responsibility to dispose of the color table when you are done with it.

RESULT CODES

invalidMovie
-2010 The movie is corrupted or invalid

Memory Manager errors

SetTrackGWorld

The SetTrackGWorld function allows you to force a track to draw into a particular graphics world. This graphics world may be different from that of the movie.

pascal void SetTrackGWorld(
                     Track theTrack,
                     CGrafPtr port,
                     GDHandle gdh,
                     TrackTransferUPP proc,
                     long refCon);
theTrack
Specifies the track for this operation. Your application obtains this identifier from such functions as GetMovieTrack, GetMovieIndTrack, and GetMovieIndTrackType.

port
Points to the graphics port structure or graphics world to which to draw the track. Set this parameter to nil to use the movie's graphics port.

gdh
Contains a handle to the movie's graphics device structure. Set this parameter to nil to use the current device. If the port parameter specifies a graphics world, set this parameter to nil to use that graphics world's graphics device.

proc
Contains a pointer to your transfer procedure. Set this parameter to nil if you want to remove your transfer procedure.

refCon
Contains a value to pass to your transfer procedure.

DISCUSSION

After the SetTrackGWorld function draws a track, it calls your transfer procedure to copy the track to the actual movie graphics world. When your transfer procedure is called, the current graphics world is set to the correct destination. You can also install a transfer procedure and set the graphics world to nil . If the graphics world is set to nil , SetTrackGWorld calls your transfer procedure only as a notification that the track has been drawn; no transfer needs to take place.

RESULT CODES

invalidTrack
-2009 This track is corrupted or invalid

© 1999 Apple Computer, Inc.

| Previous | Chapter Contents | Chapter Top | Next |